function logout(){
    $.ajax({
        type: "get",
        url: "../loginController/logoutUser",
        success: function(data, textStatus) {
        if (data.success) window.location.href="../login/index.html";
        },
        complete : function(XMLHttpRequest, textStatus) {
        },
        error : function(XMLHttpRequest,textStatus,errorThrown) {
        alert("Error:"+textStatus);
        alert(errorThrown.toString());
        }
        });
}
